package org.longteng.mobileluck.mapstruct;

import org.longteng.mobileluck.algorithm.bean.MobileNumAuspiciousVo;
import org.longteng.mobileluck.vo.MobileLuckVo;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

/**
 * mapstruct 自动DTO属性复制
 * @author hymn.com
 */
@Mapper
public interface MobileLuckMapper {
    MobileLuckMapper INSTANCT = Mappers.getMapper(MobileLuckMapper.class);

    @Mapping(target = "mobilePhoneNumber", source = "mobileNumAuspiciousTable.mobilePhoneNumber")
    @Mapping(target = "luckNum", source = "mobileNumAuspiciousTable.mobileNum")
    @Mapping(target = "luckStatus", source = "mobileNumAuspiciousTable.luckStatus")
    @Mapping(target = "meaning", source = "mobileNumAuspiciousTable.meaning")
    @Mapping(target = "fortune", source = "mobileNumFortuneTable.meaning")
    @Mapping(target = "fortuneStatus", source = "mobileNumFortuneTable.fortuneStatus")
    MobileLuckVo conver(MobileNumAuspiciousVo mobileNumAuspiciousVo);
}
